bgo#642929 - Don't infinite-loop in GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER
authorKjell Ahlstedt <kjell.ahlstedt@bredband.net>
Mon, 23 May 2011 20:02:00 +0000 (15:02 -0500)
committerFederico Mena Quintero <federico@gnome.org>
Mon, 23 May 2011 20:02:00 +0000 (15:02 -0500)
If the user pressed Enter to confirm the file chooser while the filename entry
was empty, then gtk_file_chooser_default_should_respond() would go back and forth
between the cases for handling the filename entry and the file list.

gtk/gtkfilechooserdefault.c

index ad44a9edd329b4dc77123e5c15eea870a9269019..6fdafa04e07e8624d8a2a668ab1875f0a6e668db 100644 (file)
@@ -8633,7 +8633,8 @@ gtk_file_chooser_default_should_respond (GtkFileChooserEmbed *chooser_embed)
 
       if (is_empty)
         {
-          if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE)
+          if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE
+             || impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
             return FALSE;
 
           goto file_list;